if (!treeView) {
    var treeView = {
        getChildCom:function(pid, nodeId,treeId,url){
            if (typeof ($('#'+treeId).treeview('getSelected')[0].nodes) != "undefined") {
                //这里判断当前节点下是否有值了，有就不再添加数据return防止重复添加,$('#tree').treeview('getSelected')取得当前选中的数据
                if ($('#'+treeId).treeview('getSelected')[0].nodes !=null && $('#'+treeId).treeview('getSelected')[0].nodes.length > 0) {
                    return;
                }
            }
            $.post(
                url,
                {pid:pid},
                function (obj) {
                    console.log(obj);
                    if (obj != null) {
                        for (const i in obj) {
                            var addNodes = new Array();
                            addNodes[0] = nodeId;
                            addNodes[1] = {node: {id:obj[i].id,text: obj[i].text, pid: pid,href:obj[i].href}};
                            $("#"+treeId).treeview("addNode", addNodes);
                        }
                    }
                }
            )
        }

    }
}
